package im.delight.faceless;

/**
 * Copyright (C) 2014 www.delight.im <info@delight.im>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see {http://www.gnu.org/licenses/}.
 */

public class Identicon {
	
	private static final int INDEX_MIN = 1;
	private static final int INDEX_MAX = 780;

	/**
	 * Returns a resource ID for an identicon image (user's random but unique avatar)
	 * 
	 * @param authorIndex the author's index in a given comments thread
	 * @param timePublished the time since the parent message has been published in seconds since Jan 1, 1970
	 * @return the resource ID for the avatar image
	 */
	public static int forComment(int authorIndex, long timePublished) {
		// if the given author index is out of bounds (i.e. we have no identicon for that index)
		if (authorIndex < INDEX_MIN || authorIndex > INDEX_MAX) {
			// return an empty resource
			return 0;
		}
		
		// select a random but fixed starting point for the identicon iterator
		authorIndex = (authorIndex - 1 + ((int) (timePublished / 1000))) % INDEX_MAX + INDEX_MIN;
		
		// return the identicon for the calculated index
		switch (authorIndex) {
			case 1: return R.drawable.avatar_snowman_green;
			case 2: return R.drawable.avatar_ferry_yellow;
			case 3: return R.drawable.avatar_smiley_happy_red;
			case 4: return R.drawable.avatar_lamp_blue;
			case 5: return R.drawable.avatar_calculator_white;
			case 6: return R.drawable.avatar_cabinet_files_variant_yellow;
			case 7: return R.drawable.avatar_tree_leaf_green;
			case 8: return R.drawable.avatar_newspaper_pink;
			case 9: return R.drawable.avatar_suitcase_red;
			case 10: return R.drawable.avatar_tree_pine_white;
			case 11: return R.drawable.avatar_hourglass_yellow;
			case 12: return R.drawable.avatar_ferry_green;
			case 13: return R.drawable.avatar_chess_bishop_white;
			case 14: return R.drawable.avatar_book_hardcover_open_pink;
			case 15: return R.drawable.avatar_flag_bear_white;
			case 16: return R.drawable.avatar_bed_yellow;
			case 17: return R.drawable.avatar_church_yellow;
			case 18: return R.drawable.avatar_candy_cane_yellow;
			case 19: return R.drawable.avatar_tv_remote_blue;
			case 20: return R.drawable.avatar_delete_yellow;
			case 21: return R.drawable.avatar_plane_red;
			case 22: return R.drawable.avatar_pin_white;
			case 23: return R.drawable.avatar_draw_brush_reflection_white;
			case 24: return R.drawable.avatar_shield_red;
			case 25: return R.drawable.avatar_hourglass_blue;
			case 26: return R.drawable.avatar_ring_yellow;
			case 27: return R.drawable.avatar_sport_football_blue;
			case 28: return R.drawable.avatar_moon_yellow;
			case 29: return R.drawable.avatar_candy_cane_red;
			case 30: return R.drawable.avatar_tree_leaf_three_green;
			case 31: return R.drawable.avatar_gas_red;
			case 32: return R.drawable.avatar_weather_sun_pink;
			case 33: return R.drawable.avatar_bug_blue;
			case 34: return R.drawable.avatar_delete_red;
			case 35: return R.drawable.avatar_brick_red;
			case 36: return R.drawable.avatar_church_green;
			case 37: return R.drawable.avatar_bug_white;
			case 38: return R.drawable.avatar_gas_yellow;
			case 39: return R.drawable.avatar_speakerphone_pink;
			case 40: return R.drawable.avatar_pin_yellow;
			case 41: return R.drawable.avatar_smiley_happy_white;
			case 42: return R.drawable.avatar_hardware_headphones_pink;
			case 43: return R.drawable.avatar_key_yellow;
			case 44: return R.drawable.avatar_trophy_red;
			case 45: return R.drawable.avatar_stocking_red;
			case 46: return R.drawable.avatar_cards_heart_pink;
			case 47: return R.drawable.avatar_sign_interstate_yellow;
			case 48: return R.drawable.avatar_chess_bishop_pink;
			case 49: return R.drawable.avatar_places_red;
			case 50: return R.drawable.avatar_snowman_white;
			case 51: return R.drawable.avatar_hourglass_pink;
			case 52: return R.drawable.avatar_paperclip_rotated_white;
			case 53: return R.drawable.avatar_food_apple_white;
			case 54: return R.drawable.avatar_baby_blue;
			case 55: return R.drawable.avatar_cart_green;
			case 56: return R.drawable.avatar_places_green;
			case 57: return R.drawable.avatar_transit_car_yellow;
			case 58: return R.drawable.avatar_water_droplet_reflection_white;
			case 59: return R.drawable.avatar_calculator_red;
			case 60: return R.drawable.avatar_water_droplet_reflection_green;
			case 61: return R.drawable.avatar_lamp_green;
			case 62: return R.drawable.avatar_cloud_blue;
			case 63: return R.drawable.avatar_stamp_empty_green;
			case 64: return R.drawable.avatar_anchor_green;
			case 65: return R.drawable.avatar_suitcase_blue;
			case 66: return R.drawable.avatar_chess_rook_pink;
			case 67: return R.drawable.avatar_hardware_headphones_green;
			case 68: return R.drawable.avatar_puzzle_round_pink;
			case 69: return R.drawable.avatar_currency_yen_pink;
			case 70: return R.drawable.avatar_currency_pound_yellow;
			case 71: return R.drawable.avatar_calendar_day_red;
			case 72: return R.drawable.avatar_shopping_blue;
			case 73: return R.drawable.avatar_tree_blue;
			case 74: return R.drawable.avatar_smiley_angry_green;
			case 75: return R.drawable.avatar_chess_king_green;
			case 76: return R.drawable.avatar_laptop_green;
			case 77: return R.drawable.avatar_beer_yellow;
			case 78: return R.drawable.avatar_weather_thunder_red;
			case 79: return R.drawable.avatar_video_white;
			case 80: return R.drawable.avatar_book_blue;
			case 81: return R.drawable.avatar_globe_white;
			case 82: return R.drawable.avatar_pin_pink;
			case 83: return R.drawable.avatar_transit_bus_yellow;
			case 84: return R.drawable.avatar_tree_leaf_yellow;
			case 85: return R.drawable.avatar_water_droplet_reflection_pink;
			case 86: return R.drawable.avatar_cup_red;
			case 87: return R.drawable.avatar_thumbs_down_green;
			case 88: return R.drawable.avatar_camera_yellow;
			case 89: return R.drawable.avatar_tv_red;
			case 90: return R.drawable.avatar_draw_brush_reflection_green;
			case 91: return R.drawable.avatar_smiley_angry_white;
			case 92: return R.drawable.avatar_camera_white;
			case 93: return R.drawable.avatar_sailboat_blue;
			case 94: return R.drawable.avatar_currency_pound_white;
			case 95: return R.drawable.avatar_currency_dollar_white;
			case 96: return R.drawable.avatar_cards_diamond_green;
			case 97: return R.drawable.avatar_acorn_pink;
			case 98: return R.drawable.avatar_currency_dollar_yellow;
			case 99: return R.drawable.avatar_bed_white;
			case 100: return R.drawable.avatar_bed_red;
			case 101: return R.drawable.avatar_book_hardcover_open_yellow;
			case 102: return R.drawable.avatar_chess_pawn_blue;
			case 103: return R.drawable.avatar_cd_pink;
			case 104: return R.drawable.avatar_food_blue;
			case 105: return R.drawable.avatar_cards_spade_yellow;
			case 106: return R.drawable.avatar_cards_spade_blue;
			case 107: return R.drawable.avatar_cd_green;
			case 108: return R.drawable.avatar_clothes_shirt_yellow;
			case 109: return R.drawable.avatar_thumbs_down_white;
			case 110: return R.drawable.avatar_hardware_headphones_red;
			case 111: return R.drawable.avatar_weather_snow_yellow;
			case 112: return R.drawable.avatar_shield_yellow;
			case 113: return R.drawable.avatar_scissor_pink;
			case 114: return R.drawable.avatar_foot_green;
			case 115: return R.drawable.avatar_weather_rain_white;
			case 116: return R.drawable.avatar_paperclip_rotated_pink;
			case 117: return R.drawable.avatar_cabinet_files_variant_blue;
			case 118: return R.drawable.avatar_cog_red;
			case 119: return R.drawable.avatar_clothes_shirt_pink;
			case 120: return R.drawable.avatar_chess_rook_white;
			case 121: return R.drawable.avatar_tv_white;
			case 122: return R.drawable.avatar_water_droplet_reflection_yellow;
			case 123: return R.drawable.avatar_ring_pink;
			case 124: return R.drawable.avatar_trophy_pink;
			case 125: return R.drawable.avatar_heart_white;
			case 126: return R.drawable.avatar_cog_white;
			case 127: return R.drawable.avatar_lightbulb_pink;
			case 128: return R.drawable.avatar_quill_blue;
			case 129: return R.drawable.avatar_beer_red;
			case 130: return R.drawable.avatar_tree_leaf_three_blue;
			case 131: return R.drawable.avatar_chat_white;
			case 132: return R.drawable.avatar_smiley_grin_red;
			case 133: return R.drawable.avatar_lock_pink;
			case 134: return R.drawable.avatar_quill_white;
			case 135: return R.drawable.avatar_book_hardcover_open_green;
			case 136: return R.drawable.avatar_tree_red;
			case 137: return R.drawable.avatar_city_sanfrancisco_blue;
			case 138: return R.drawable.avatar_train_track_red;
			case 139: return R.drawable.avatar_chess_king_yellow;
			case 140: return R.drawable.avatar_music_blue;
			case 141: return R.drawable.avatar_weather_snow_red;
			case 142: return R.drawable.avatar_camera_flash_red;
			case 143: return R.drawable.avatar_cupcake_white;
			case 144: return R.drawable.avatar_calculator_blue;
			case 145: return R.drawable.avatar_foot_yellow;
			case 146: return R.drawable.avatar_ring_green;
			case 147: return R.drawable.avatar_smiley_frown_red;
			case 148: return R.drawable.avatar_stocking_pink;
			case 149: return R.drawable.avatar_palmtree_white;
			case 150: return R.drawable.avatar_star_yellow;
			case 151: return R.drawable.avatar_present_pink;
			case 152: return R.drawable.avatar_lock_red;
			case 153: return R.drawable.avatar_lamp_white;
			case 154: return R.drawable.avatar_newspaper_green;
			case 155: return R.drawable.avatar_draw_pencil_yellow;
			case 156: return R.drawable.avatar_sign_interstate_red;
			case 157: return R.drawable.avatar_lifesaver_green;
			case 158: return R.drawable.avatar_check_white;
			case 159: return R.drawable.avatar_globe_red;
			case 160: return R.drawable.avatar_lock_blue;
			case 161: return R.drawable.avatar_currency_pound_green;
			case 162: return R.drawable.avatar_book_hardcover_open_blue;
			case 163: return R.drawable.avatar_icecream_bar_red;
			case 164: return R.drawable.avatar_clothes_shirt_green;
			case 165: return R.drawable.avatar_draw_brush_reflection_red;
			case 166: return R.drawable.avatar_moon_pink;
			case 167: return R.drawable.avatar_forklift_blue;
			case 168: return R.drawable.avatar_cloud_yellow;
			case 169: return R.drawable.avatar_key_white;
			case 170: return R.drawable.avatar_battery_3_green;
			case 171: return R.drawable.avatar_sailboat_green;
			case 172: return R.drawable.avatar_newspaper_red;
			case 173: return R.drawable.avatar_lightbulb_green;
			case 174: return R.drawable.avatar_city_sanfrancisco_pink;
			case 175: return R.drawable.avatar_cards_spade_white;
			case 176: return R.drawable.avatar_shopping_yellow;
			case 177: return R.drawable.avatar_video_green;
			case 178: return R.drawable.avatar_cards_club_yellow;
			case 179: return R.drawable.avatar_weather_rain_pink;
			case 180: return R.drawable.avatar_cards_spade_pink;
			case 181: return R.drawable.avatar_snowflake_pink;
			case 182: return R.drawable.avatar_cone_white;
			case 183: return R.drawable.avatar_sport_football_yellow;
			case 184: return R.drawable.avatar_anchor_yellow;
			case 185: return R.drawable.avatar_home_yellow;
			case 186: return R.drawable.avatar_food_silverware_blue;
			case 187: return R.drawable.avatar_trophy_yellow;
			case 188: return R.drawable.avatar_lightbulb_red;
			case 189: return R.drawable.avatar_smiley_grin_yellow;
			case 190: return R.drawable.avatar_weather_thunder_blue;
			case 191: return R.drawable.avatar_sleep_blue;
			case 192: return R.drawable.avatar_smiley_angry_yellow;
			case 193: return R.drawable.avatar_sleep_white;
			case 194: return R.drawable.avatar_cards_heart_green;
			case 195: return R.drawable.avatar_tree_pine_pink;
			case 196: return R.drawable.avatar_chess_queen_green;
			case 197: return R.drawable.avatar_cupcake_pink;
			case 198: return R.drawable.avatar_store_green;
			case 199: return R.drawable.avatar_speakerphone_white;
			case 200: return R.drawable.avatar_cards_diamond_yellow;
			case 201: return R.drawable.avatar_cd_yellow;
			case 202: return R.drawable.avatar_anchor_red;
			case 203: return R.drawable.avatar_rocket_blue;
			case 204: return R.drawable.avatar_smiley_angry_blue;
			case 205: return R.drawable.avatar_tree_leaf_pink;
			case 206: return R.drawable.avatar_food_silverware_white;
			case 207: return R.drawable.avatar_chess_rook_blue;
			case 208: return R.drawable.avatar_icecream_bar_pink;
			case 209: return R.drawable.avatar_bug_yellow;
			case 210: return R.drawable.avatar_transit_bus_red;
			case 211: return R.drawable.avatar_tv_remote_yellow;
			case 212: return R.drawable.avatar_bug_pink;
			case 213: return R.drawable.avatar_ferry_white;
			case 214: return R.drawable.avatar_email_minimal_blue;
			case 215: return R.drawable.avatar_icecream_bar_blue;
			case 216: return R.drawable.avatar_cards_diamond_red;
			case 217: return R.drawable.avatar_rocket_white;
			case 218: return R.drawable.avatar_weather_thunder_green;
			case 219: return R.drawable.avatar_food_apple_green;
			case 220: return R.drawable.avatar_music_pink;
			case 221: return R.drawable.avatar_check_yellow;
			case 222: return R.drawable.avatar_flag_wavy_yellow;
			case 223: return R.drawable.avatar_tree_leaf_red;
			case 224: return R.drawable.avatar_church_white;
			case 225: return R.drawable.avatar_scissor_red;
			case 226: return R.drawable.avatar_weather_sun_white;
			case 227: return R.drawable.avatar_currency_pound_blue;
			case 228: return R.drawable.avatar_clothes_tie_green;
			case 229: return R.drawable.avatar_tv_remote_white;
			case 230: return R.drawable.avatar_sleep_green;
			case 231: return R.drawable.avatar_cart_white;
			case 232: return R.drawable.avatar_currency_dollar_red;
			case 233: return R.drawable.avatar_baby_pink;
			case 234: return R.drawable.avatar_quill_pink;
			case 235: return R.drawable.avatar_clock_pink;
			case 236: return R.drawable.avatar_cog_yellow;
			case 237: return R.drawable.avatar_city_green;
			case 238: return R.drawable.avatar_food_silverware_red;
			case 239: return R.drawable.avatar_cards_heart_yellow;
			case 240: return R.drawable.avatar_smiley_grin_blue;
			case 241: return R.drawable.avatar_church_blue;
			case 242: return R.drawable.avatar_plane_yellow;
			case 243: return R.drawable.avatar_calculator_yellow;
			case 244: return R.drawable.avatar_tree_white;
			case 245: return R.drawable.avatar_smiley_angry_red;
			case 246: return R.drawable.avatar_home_red;
			case 247: return R.drawable.avatar_shield_pink;
			case 248: return R.drawable.avatar_chess_rook_green;
			case 249: return R.drawable.avatar_movie_clapper_green;
			case 250: return R.drawable.avatar_lifesaver_blue;
			case 251: return R.drawable.avatar_palmtree_blue;
			case 252: return R.drawable.avatar_water_droplet_reflection_blue;
			case 253: return R.drawable.avatar_thumbs_up_blue;
			case 254: return R.drawable.avatar_cards_heart_blue;
			case 255: return R.drawable.avatar_laptop_red;
			case 256: return R.drawable.avatar_star_pink;
			case 257: return R.drawable.avatar_anchor_blue;
			case 258: return R.drawable.avatar_scissor_green;
			case 259: return R.drawable.avatar_moon_green;
			case 260: return R.drawable.avatar_chess_horse_yellow;
			case 261: return R.drawable.avatar_currency_yen_red;
			case 262: return R.drawable.avatar_hardware_headphones_yellow;
			case 263: return R.drawable.avatar_snowflake_yellow;
			case 264: return R.drawable.avatar_draw_brush_reflection_yellow;
			case 265: return R.drawable.avatar_quill_red;
			case 266: return R.drawable.avatar_present_yellow;
			case 267: return R.drawable.avatar_chat_green;
			case 268: return R.drawable.avatar_rocket_green;
			case 269: return R.drawable.avatar_icecream_bar_white;
			case 270: return R.drawable.avatar_calculator_green;
			case 271: return R.drawable.avatar_paperclip_rotated_red;
			case 272: return R.drawable.avatar_thermometer_white;
			case 273: return R.drawable.avatar_heart_pink;
			case 274: return R.drawable.avatar_currency_euro_green;
			case 275: return R.drawable.avatar_transit_car_green;
			case 276: return R.drawable.avatar_thumbs_up_white;
			case 277: return R.drawable.avatar_ornament_red;
			case 278: return R.drawable.avatar_shield_blue;
			case 279: return R.drawable.avatar_train_yellow;
			case 280: return R.drawable.avatar_weather_thunder_pink;
			case 281: return R.drawable.avatar_stamp_empty_red;
			case 282: return R.drawable.avatar_clock_blue;
			case 283: return R.drawable.avatar_weather_rain_yellow;
			case 284: return R.drawable.avatar_lightbulb_blue;
			case 285: return R.drawable.avatar_lock_green;
			case 286: return R.drawable.avatar_clock_red;
			case 287: return R.drawable.avatar_chess_rook_red;
			case 288: return R.drawable.avatar_cards_heart_red;
			case 289: return R.drawable.avatar_camera_red;
			case 290: return R.drawable.avatar_smiley_grin_pink;
			case 291: return R.drawable.avatar_sailboat_red;
			case 292: return R.drawable.avatar_suitcase_white;
			case 293: return R.drawable.avatar_chess_pawn_green;
			case 294: return R.drawable.avatar_thumbs_up_yellow;
			case 295: return R.drawable.avatar_check_red;
			case 296: return R.drawable.avatar_present_blue;
			case 297: return R.drawable.avatar_train_track_green;
			case 298: return R.drawable.avatar_snowflake_blue;
			case 299: return R.drawable.avatar_battery_3_pink;
			case 300: return R.drawable.avatar_scissor_blue;
			case 301: return R.drawable.avatar_camera_pink;
			case 302: return R.drawable.avatar_present_white;
			case 303: return R.drawable.avatar_tree_leaf_three_pink;
			case 304: return R.drawable.avatar_chat_yellow;
			case 305: return R.drawable.avatar_sport_football_green;
			case 306: return R.drawable.avatar_sport_football_pink;
			case 307: return R.drawable.avatar_paw_blue;
			case 308: return R.drawable.avatar_book_white;
			case 309: return R.drawable.avatar_city_sanfrancisco_red;
			case 310: return R.drawable.avatar_paw_yellow;
			case 311: return R.drawable.avatar_home_blue;
			case 312: return R.drawable.avatar_crown_white;
			case 313: return R.drawable.avatar_candy_cane_white;
			case 314: return R.drawable.avatar_calculator_pink;
			case 315: return R.drawable.avatar_cloud_red;
			case 316: return R.drawable.avatar_thumbs_up_pink;
			case 317: return R.drawable.avatar_scissor_yellow;
			case 318: return R.drawable.avatar_thermometer_green;
			case 319: return R.drawable.avatar_plane_blue;
			case 320: return R.drawable.avatar_moon_red;
			case 321: return R.drawable.avatar_smiley_happy_green;
			case 322: return R.drawable.avatar_baby_red;
			case 323: return R.drawable.avatar_candle_red;
			case 324: return R.drawable.avatar_gas_pink;
			case 325: return R.drawable.avatar_cone_blue;
			case 326: return R.drawable.avatar_calendar_day_blue;
			case 327: return R.drawable.avatar_food_white;
			case 328: return R.drawable.avatar_speakerphone_green;
			case 329: return R.drawable.avatar_tree_leaf_three_red;
			case 330: return R.drawable.avatar_puzzle_round_yellow;
			case 331: return R.drawable.avatar_gas_blue;
			case 332: return R.drawable.avatar_cup_white;
			case 333: return R.drawable.avatar_battery_3_blue;
			case 334: return R.drawable.avatar_lamp_pink;
			case 335: return R.drawable.avatar_key_blue;
			case 336: return R.drawable.avatar_snowflake_red;
			case 337: return R.drawable.avatar_smiley_frown_blue;
			case 338: return R.drawable.avatar_calendar_day_pink;
			case 339: return R.drawable.avatar_flag_bear_green;
			case 340: return R.drawable.avatar_transit_car_pink;
			case 341: return R.drawable.avatar_chess_bishop_yellow;
			case 342: return R.drawable.avatar_food_red;
			case 343: return R.drawable.avatar_battery_3_yellow;
			case 344: return R.drawable.avatar_cards_club_blue;
			case 345: return R.drawable.avatar_shopping_green;
			case 346: return R.drawable.avatar_stocking_yellow;
			case 347: return R.drawable.avatar_calendar_day_green;
			case 348: return R.drawable.avatar_flag_wavy_blue;
			case 349: return R.drawable.avatar_lock_yellow;
			case 350: return R.drawable.avatar_currency_dollar_pink;
			case 351: return R.drawable.avatar_calendar_day_yellow;
			case 352: return R.drawable.avatar_thumbs_up_green;
			case 353: return R.drawable.avatar_cards_diamond_pink;
			case 354: return R.drawable.avatar_battery_3_white;
			case 355: return R.drawable.avatar_stocking_white;
			case 356: return R.drawable.avatar_stocking_green;
			case 357: return R.drawable.avatar_sport_football_red;
			case 358: return R.drawable.avatar_flag_bear_yellow;
			case 359: return R.drawable.avatar_tree_leaf_blue;
			case 360: return R.drawable.avatar_camera_flash_pink;
			case 361: return R.drawable.avatar_candle_yellow;
			case 362: return R.drawable.avatar_book_pink;
			case 363: return R.drawable.avatar_paperclip_rotated_yellow;
			case 364: return R.drawable.avatar_city_pink;
			case 365: return R.drawable.avatar_currency_euro_yellow;
			case 366: return R.drawable.avatar_lifesaver_pink;
			case 367: return R.drawable.avatar_clock_white;
			case 368: return R.drawable.avatar_weather_sun_green;
			case 369: return R.drawable.avatar_paw_green;
			case 370: return R.drawable.avatar_thermometer_red;
			case 371: return R.drawable.avatar_present_green;
			case 372: return R.drawable.avatar_scissor_white;
			case 373: return R.drawable.avatar_camera_flash_white;
			case 374: return R.drawable.avatar_camera_blue;
			case 375: return R.drawable.avatar_train_green;
			case 376: return R.drawable.avatar_laptop_yellow;
			case 377: return R.drawable.avatar_thermometer_blue;
			case 378: return R.drawable.avatar_movie_clapper_blue;
			case 379: return R.drawable.avatar_currency_euro_pink;
			case 380: return R.drawable.avatar_ferry_pink;
			case 381: return R.drawable.avatar_chess_pawn_red;
			case 382: return R.drawable.avatar_cabinet_files_variant_pink;
			case 383: return R.drawable.avatar_transit_bus_white;
			case 384: return R.drawable.avatar_hourglass_green;
			case 385: return R.drawable.avatar_flag_wavy_green;
			case 386: return R.drawable.avatar_plane_white;
			case 387: return R.drawable.avatar_cards_club_red;
			case 388: return R.drawable.avatar_home_pink;
			case 389: return R.drawable.avatar_crown_green;
			case 390: return R.drawable.avatar_sign_interstate_green;
			case 391: return R.drawable.avatar_ornament_blue;
			case 392: return R.drawable.avatar_music_yellow;
			case 393: return R.drawable.avatar_music_white;
			case 394: return R.drawable.avatar_trophy_white;
			case 395: return R.drawable.avatar_hardware_headphones_blue;
			case 396: return R.drawable.avatar_puzzle_round_red;
			case 397: return R.drawable.avatar_city_sanfrancisco_yellow;
			case 398: return R.drawable.avatar_crown_yellow;
			case 399: return R.drawable.avatar_weather_rain_blue;
			case 400: return R.drawable.avatar_cone_green;
			case 401: return R.drawable.avatar_delete_green;
			case 402: return R.drawable.avatar_clothes_tie_white;
			case 403: return R.drawable.avatar_bed_green;
			case 404: return R.drawable.avatar_weather_sun_red;
			case 405: return R.drawable.avatar_bed_pink;
			case 406: return R.drawable.avatar_cupcake_red;
			case 407: return R.drawable.avatar_newspaper_yellow;
			case 408: return R.drawable.avatar_lifesaver_yellow;
			case 409: return R.drawable.avatar_thumbs_down_blue;
			case 410: return R.drawable.avatar_cloud_pink;
			case 411: return R.drawable.avatar_paperclip_rotated_green;
			case 412: return R.drawable.avatar_book_green;
			case 413: return R.drawable.avatar_pin_red;
			case 414: return R.drawable.avatar_currency_dollar_green;
			case 415: return R.drawable.avatar_paw_white;
			case 416: return R.drawable.avatar_sailboat_white;
			case 417: return R.drawable.avatar_tv_blue;
			case 418: return R.drawable.avatar_sign_interstate_pink;
			case 419: return R.drawable.avatar_beer_green;
			case 420: return R.drawable.avatar_store_yellow;
			case 421: return R.drawable.avatar_candy_cane_blue;
			case 422: return R.drawable.avatar_globe_blue;
			case 423: return R.drawable.avatar_food_apple_yellow;
			case 424: return R.drawable.avatar_acorn_green;
			case 425: return R.drawable.avatar_clothes_tie_yellow;
			case 426: return R.drawable.avatar_scale_pink;
			case 427: return R.drawable.avatar_store_red;
			case 428: return R.drawable.avatar_home_green;
			case 429: return R.drawable.avatar_home_white;
			case 430: return R.drawable.avatar_beer_blue;
			case 431: return R.drawable.avatar_cloud_white;
			case 432: return R.drawable.avatar_places_pink;
			case 433: return R.drawable.avatar_music_red;
			case 434: return R.drawable.avatar_thermometer_yellow;
			case 435: return R.drawable.avatar_speakerphone_red;
			case 436: return R.drawable.avatar_star_red;
			case 437: return R.drawable.avatar_currency_euro_blue;
			case 438: return R.drawable.avatar_weather_sun_yellow;
			case 439: return R.drawable.avatar_chat_pink;
			case 440: return R.drawable.avatar_smiley_frown_green;
			case 441: return R.drawable.avatar_cards_diamond_blue;
			case 442: return R.drawable.avatar_chess_king_blue;
			case 443: return R.drawable.avatar_puzzle_round_blue;
			case 444: return R.drawable.avatar_city_sanfrancisco_white;
			case 445: return R.drawable.avatar_scale_red;
			case 446: return R.drawable.avatar_sailboat_pink;
			case 447: return R.drawable.avatar_foot_pink;
			case 448: return R.drawable.avatar_shield_green;
			case 449: return R.drawable.avatar_clipboard_paper_red;
			case 450: return R.drawable.avatar_candle_green;
			case 451: return R.drawable.avatar_thumbs_down_yellow;
			case 452: return R.drawable.avatar_transit_bus_pink;
			case 453: return R.drawable.avatar_chess_bishop_green;
			case 454: return R.drawable.avatar_clothes_shirt_blue;
			case 455: return R.drawable.avatar_cd_white;
			case 456: return R.drawable.avatar_speakerphone_blue;
			case 457: return R.drawable.avatar_church_pink;
			case 458: return R.drawable.avatar_rocket_yellow;
			case 459: return R.drawable.avatar_chess_king_white;
			case 460: return R.drawable.avatar_currency_dollar_blue;
			case 461: return R.drawable.avatar_cup_yellow;
			case 462: return R.drawable.avatar_video_red;
			case 463: return R.drawable.avatar_scale_green;
			case 464: return R.drawable.avatar_star_green;
			case 465: return R.drawable.avatar_heart_blue;
			case 466: return R.drawable.avatar_food_pink;
			case 467: return R.drawable.avatar_stamp_empty_white;
			case 468: return R.drawable.avatar_food_apple_blue;
			case 469: return R.drawable.avatar_check_blue;
			case 470: return R.drawable.avatar_movie_clapper_pink;
			case 471: return R.drawable.avatar_lifesaver_white;
			case 472: return R.drawable.avatar_hardware_headphones_white;
			case 473: return R.drawable.avatar_cards_heart_white;
			case 474: return R.drawable.avatar_tv_pink;
			case 475: return R.drawable.avatar_flag_bear_pink;
			case 476: return R.drawable.avatar_tv_remote_green;
			case 477: return R.drawable.avatar_smiley_happy_pink;
			case 478: return R.drawable.avatar_currency_euro_white;
			case 479: return R.drawable.avatar_crown_pink;
			case 480: return R.drawable.avatar_cards_diamond_white;
			case 481: return R.drawable.avatar_laptop_white;
			case 482: return R.drawable.avatar_draw_pencil_white;
			case 483: return R.drawable.avatar_scale_white;
			case 484: return R.drawable.avatar_food_silverware_pink;
			case 485: return R.drawable.avatar_video_yellow;
			case 486: return R.drawable.avatar_flag_wavy_pink;
			case 487: return R.drawable.avatar_cart_yellow;
			case 488: return R.drawable.avatar_key_red;
			case 489: return R.drawable.avatar_beer_pink;
			case 490: return R.drawable.avatar_snowman_red;
			case 491: return R.drawable.avatar_cup_green;
			case 492: return R.drawable.avatar_hourglass_white;
			case 493: return R.drawable.avatar_sleep_yellow;
			case 494: return R.drawable.avatar_chess_horse_white;
			case 495: return R.drawable.avatar_chess_queen_pink;
			case 496: return R.drawable.avatar_speakerphone_yellow;
			case 497: return R.drawable.avatar_weather_snow_white;
			case 498: return R.drawable.avatar_suitcase_green;
			case 499: return R.drawable.avatar_key_pink;
			case 500: return R.drawable.avatar_tree_pine_red;
			case 501: return R.drawable.avatar_food_yellow;
			case 502: return R.drawable.avatar_chat_blue;
			case 503: return R.drawable.avatar_cabinet_files_variant_red;
			case 504: return R.drawable.avatar_heart_red;
			case 505: return R.drawable.avatar_foot_red;
			case 506: return R.drawable.avatar_weather_snow_green;
			case 507: return R.drawable.avatar_places_yellow;
			case 508: return R.drawable.avatar_trophy_green;
			case 509: return R.drawable.avatar_shopping_pink;
			case 510: return R.drawable.avatar_movie_clapper_yellow;
			case 511: return R.drawable.avatar_puzzle_round_green;
			case 512: return R.drawable.avatar_camera_flash_yellow;
			case 513: return R.drawable.avatar_currency_yen_yellow;
			case 514: return R.drawable.avatar_cd_blue;
			case 515: return R.drawable.avatar_clothes_tie_pink;
			case 516: return R.drawable.avatar_cards_spade_red;
			case 517: return R.drawable.avatar_ferry_blue;
			case 518: return R.drawable.avatar_thermometer_pink;
			case 519: return R.drawable.avatar_chess_horse_pink;
			case 520: return R.drawable.avatar_cd_red;
			case 521: return R.drawable.avatar_plant_green;
			case 522: return R.drawable.avatar_cards_club_white;
			case 523: return R.drawable.avatar_cog_pink;
			case 524: return R.drawable.avatar_train_white;
			case 525: return R.drawable.avatar_weather_thunder_yellow;
			case 526: return R.drawable.avatar_ornament_pink;
			case 527: return R.drawable.avatar_chess_horse_green;
			case 528: return R.drawable.avatar_weather_snow_pink;
			case 529: return R.drawable.avatar_lamp_red;
			case 530: return R.drawable.avatar_currency_pound_red;
			case 531: return R.drawable.avatar_weather_rain_green;
			case 532: return R.drawable.avatar_plane_pink;
			case 533: return R.drawable.avatar_email_minimal_white;
			case 534: return R.drawable.avatar_video_blue;
			case 535: return R.drawable.avatar_laptop_blue;
			case 536: return R.drawable.avatar_tree_pine_blue;
			case 537: return R.drawable.avatar_clock_green;
			case 538: return R.drawable.avatar_brick_yellow;
			case 539: return R.drawable.avatar_sport_football_white;
			case 540: return R.drawable.avatar_delete_blue;
			case 541: return R.drawable.avatar_chess_pawn_yellow;
			case 542: return R.drawable.avatar_bed_blue;
			case 543: return R.drawable.avatar_icecream_bar_green;
			case 544: return R.drawable.avatar_thumbs_down_red;
			case 545: return R.drawable.avatar_transit_bus_green;
			case 546: return R.drawable.avatar_cloud_green;
			case 547: return R.drawable.avatar_transit_car_blue;
			case 548: return R.drawable.avatar_church_red;
			case 549: return R.drawable.avatar_snowflake_green;
			case 550: return R.drawable.avatar_brick_white;
			case 551: return R.drawable.avatar_movie_clapper_red;
			case 552: return R.drawable.avatar_lock_white;
			case 553: return R.drawable.avatar_chess_horse_red;
			case 554: return R.drawable.avatar_ferry_red;
			case 555: return R.drawable.avatar_shopping_red;
			case 556: return R.drawable.avatar_anchor_white;
			case 557: return R.drawable.avatar_bug_green;
			case 558: return R.drawable.avatar_smiley_frown_white;
			case 559: return R.drawable.avatar_currency_yen_blue;
			case 560: return R.drawable.avatar_palmtree_green;
			case 561: return R.drawable.avatar_ring_blue;
			case 562: return R.drawable.avatar_city_white;
			case 563: return R.drawable.avatar_candle_pink;
			case 564: return R.drawable.avatar_smiley_happy_yellow;
			case 565: return R.drawable.avatar_forklift_red;
			case 566: return R.drawable.avatar_heart_yellow;
			case 567: return R.drawable.avatar_foot_blue;
			case 568: return R.drawable.avatar_pin_green;
			case 569: return R.drawable.avatar_moon_white;
			case 570: return R.drawable.avatar_city_blue;
			case 571: return R.drawable.avatar_newspaper_blue;
			case 572: return R.drawable.avatar_sign_interstate_blue;
			case 573: return R.drawable.avatar_snowman_yellow;
			case 574: return R.drawable.avatar_chess_queen_yellow;
			case 575: return R.drawable.avatar_sleep_pink;
			case 576: return R.drawable.avatar_chess_queen_white;
			case 577: return R.drawable.avatar_clothes_shirt_white;
			case 578: return R.drawable.avatar_smiley_frown_pink;
			case 579: return R.drawable.avatar_tree_green;
			case 580: return R.drawable.avatar_check_pink;
			case 581: return R.drawable.avatar_palmtree_pink;
			case 582: return R.drawable.avatar_chat_red;
			case 583: return R.drawable.avatar_ring_red;
			case 584: return R.drawable.avatar_suitcase_pink;
			case 585: return R.drawable.avatar_currency_euro_red;
			case 586: return R.drawable.avatar_cabinet_files_variant_green;
			case 587: return R.drawable.avatar_draw_pencil_pink;
			case 588: return R.drawable.avatar_chess_bishop_red;
			case 589: return R.drawable.avatar_pin_blue;
			case 590: return R.drawable.avatar_camera_green;
			case 591: return R.drawable.avatar_store_white;
			case 592: return R.drawable.avatar_clock_yellow;
			case 593: return R.drawable.avatar_lightbulb_yellow;
			case 594: return R.drawable.avatar_currency_yen_white;
			case 595: return R.drawable.avatar_sign_interstate_white;
			case 596: return R.drawable.avatar_newspaper_white;
			case 597: return R.drawable.avatar_rocket_red;
			case 598: return R.drawable.avatar_chess_king_red;
			case 599: return R.drawable.avatar_beer_white;
			case 600: return R.drawable.avatar_ornament_yellow;
			case 601: return R.drawable.avatar_shopping_white;
			case 602: return R.drawable.avatar_draw_brush_reflection_pink;
			case 603: return R.drawable.avatar_globe_yellow;
			case 604: return R.drawable.avatar_brick_green;
			case 605: return R.drawable.avatar_shield_white;
			case 606: return R.drawable.avatar_flag_wavy_red;
			case 607: return R.drawable.avatar_palmtree_red;
			case 608: return R.drawable.avatar_camera_flash_blue;
			case 609: return R.drawable.avatar_tree_yellow;
			case 610: return R.drawable.avatar_transit_car_white;
			case 611: return R.drawable.avatar_clipboard_paper_green;
			case 612: return R.drawable.avatar_train_blue;
			case 613: return R.drawable.avatar_paperclip_rotated_blue;
			case 614: return R.drawable.avatar_places_blue;
			case 615: return R.drawable.avatar_ornament_white;
			case 616: return R.drawable.avatar_cart_blue;
			case 617: return R.drawable.avatar_tv_remote_pink;
			case 618: return R.drawable.avatar_clothes_tie_red;
			case 619: return R.drawable.avatar_forklift_yellow;
			case 620: return R.drawable.avatar_delete_pink;
			case 621: return R.drawable.avatar_cup_blue;
			case 622: return R.drawable.avatar_cards_spade_green;
			case 623: return R.drawable.avatar_crown_blue;
			case 624: return R.drawable.avatar_smiley_grin_green;
			case 625: return R.drawable.avatar_gas_white;
			case 626: return R.drawable.avatar_lightbulb_white;
			case 627: return R.drawable.avatar_movie_clapper_white;
			case 628: return R.drawable.avatar_calendar_day_white;
			case 629: return R.drawable.avatar_clipboard_paper_white;
			case 630: return R.drawable.avatar_forklift_white;
			case 631: return R.drawable.avatar_cards_club_pink;
			case 632: return R.drawable.avatar_sailboat_yellow;
			case 633: return R.drawable.avatar_forklift_pink;
			case 634: return R.drawable.avatar_brick_pink;
			case 635: return R.drawable.avatar_city_red;
			case 636: return R.drawable.avatar_weather_thunder_white;
			case 637: return R.drawable.avatar_flag_bear_red;
			case 638: return R.drawable.avatar_email_minimal_red;
			case 639: return R.drawable.avatar_plant_white;
			case 640: return R.drawable.avatar_flag_bear_blue;
			case 641: return R.drawable.avatar_tree_leaf_white;
			case 642: return R.drawable.avatar_food_silverware_green;
			case 643: return R.drawable.avatar_plane_green;
			case 644: return R.drawable.avatar_globe_pink;
			case 645: return R.drawable.avatar_water_droplet_reflection_red;
			case 646: return R.drawable.avatar_cupcake_green;
			case 647: return R.drawable.avatar_tv_yellow;
			case 648: return R.drawable.avatar_quill_yellow;
			case 649: return R.drawable.avatar_snowman_blue;
			case 650: return R.drawable.avatar_crown_red;
			case 651: return R.drawable.avatar_book_hardcover_open_white;
			case 652: return R.drawable.avatar_draw_pencil_blue;
			case 653: return R.drawable.avatar_weather_rain_red;
			case 654: return R.drawable.avatar_tree_leaf_three_yellow;
			case 655: return R.drawable.avatar_chess_horse_blue;
			case 656: return R.drawable.avatar_draw_pencil_green;
			case 657: return R.drawable.avatar_cog_blue;
			case 658: return R.drawable.avatar_candy_cane_pink;
			case 659: return R.drawable.avatar_stamp_empty_blue;
			case 660: return R.drawable.avatar_email_minimal_green;
			case 661: return R.drawable.avatar_acorn_yellow;
			case 662: return R.drawable.avatar_bug_red;
			case 663: return R.drawable.avatar_globe_green;
			case 664: return R.drawable.avatar_train_pink;
			case 665: return R.drawable.avatar_heart_green;
			case 666: return R.drawable.avatar_scale_blue;
			case 667: return R.drawable.avatar_thumbs_down_pink;
			case 668: return R.drawable.avatar_acorn_red;
			case 669: return R.drawable.avatar_store_blue;
			case 670: return R.drawable.avatar_chess_queen_blue;
			case 671: return R.drawable.avatar_paw_red;
			case 672: return R.drawable.avatar_stamp_empty_yellow;
			case 673: return R.drawable.avatar_anchor_pink;
			case 674: return R.drawable.avatar_cup_pink;
			case 675: return R.drawable.avatar_star_blue;
			case 676: return R.drawable.avatar_paw_pink;
			case 677: return R.drawable.avatar_draw_pencil_red;
			case 678: return R.drawable.avatar_chess_king_pink;
			case 679: return R.drawable.avatar_plant_red;
			case 680: return R.drawable.avatar_flag_wavy_white;
			case 681: return R.drawable.avatar_quill_green;
			case 682: return R.drawable.avatar_cone_red;
			case 683: return R.drawable.avatar_chess_bishop_blue;
			case 684: return R.drawable.avatar_cards_club_green;
			case 685: return R.drawable.avatar_cone_pink;
			case 686: return R.drawable.avatar_cabinet_files_variant_white;
			case 687: return R.drawable.avatar_tree_pine_yellow;
			case 688: return R.drawable.avatar_snowman_pink;
			case 689: return R.drawable.avatar_candle_white;
			case 690: return R.drawable.avatar_trophy_blue;
			case 691: return R.drawable.avatar_tv_remote_red;
			case 692: return R.drawable.avatar_chess_pawn_pink;
			case 693: return R.drawable.avatar_forklift_green;
			case 694: return R.drawable.avatar_plant_yellow;
			case 695: return R.drawable.avatar_ring_white;
			case 696: return R.drawable.avatar_hourglass_red;
			case 697: return R.drawable.avatar_smiley_frown_yellow;
			case 698: return R.drawable.avatar_present_red;
			case 699: return R.drawable.avatar_city_sanfrancisco_green;
			case 700: return R.drawable.avatar_baby_yellow;
			case 701: return R.drawable.avatar_chess_queen_red;
			case 702: return R.drawable.avatar_cog_green;
			case 703: return R.drawable.avatar_acorn_blue;
			case 704: return R.drawable.avatar_clipboard_paper_yellow;
			case 705: return R.drawable.avatar_suitcase_yellow;
			case 706: return R.drawable.avatar_places_white;
			case 707: return R.drawable.avatar_train_red;
			case 708: return R.drawable.avatar_train_track_blue;
			case 709: return R.drawable.avatar_food_apple_red;
			case 710: return R.drawable.avatar_currency_pound_pink;
			case 711: return R.drawable.avatar_chess_rook_yellow;
			case 712: return R.drawable.avatar_weather_sun_blue;
			case 713: return R.drawable.avatar_acorn_white;
			case 714: return R.drawable.avatar_candle_blue;
			case 715: return R.drawable.avatar_ornament_green;
			case 716: return R.drawable.avatar_weather_snow_blue;
			case 717: return R.drawable.avatar_train_track_white;
			case 718: return R.drawable.avatar_music_green;
			case 719: return R.drawable.avatar_tree_pink;
			case 720: return R.drawable.avatar_stocking_blue;
			case 721: return R.drawable.avatar_cupcake_yellow;
			case 722: return R.drawable.avatar_cart_red;
			case 723: return R.drawable.avatar_food_silverware_yellow;
			case 724: return R.drawable.avatar_train_track_yellow;
			case 725: return R.drawable.avatar_star_white;
			case 726: return R.drawable.avatar_battery_3_red;
			case 727: return R.drawable.avatar_clipboard_paper_pink;
			case 728: return R.drawable.avatar_smiley_happy_blue;
			case 729: return R.drawable.avatar_foot_white;
			case 730: return R.drawable.avatar_transit_bus_blue;
			case 731: return R.drawable.avatar_baby_white;
			case 732: return R.drawable.avatar_transit_car_red;
			case 733: return R.drawable.avatar_draw_brush_reflection_blue;
			case 734: return R.drawable.avatar_clothes_shirt_red;
			case 735: return R.drawable.avatar_cone_yellow;
			case 736: return R.drawable.avatar_tree_leaf_three_white;
			case 737: return R.drawable.avatar_chess_pawn_white;
			case 738: return R.drawable.avatar_lifesaver_red;
			case 739: return R.drawable.avatar_puzzle_round_white;
			case 740: return R.drawable.avatar_stamp_empty_pink;
			case 741: return R.drawable.avatar_currency_yen_green;
			case 742: return R.drawable.avatar_candy_cane_green;
			case 743: return R.drawable.avatar_tree_pine_green;
			case 744: return R.drawable.avatar_key_green;
			case 745: return R.drawable.avatar_cart_pink;
			case 746: return R.drawable.avatar_baby_green;
			case 747: return R.drawable.avatar_gas_green;
			case 748: return R.drawable.avatar_book_yellow;
			case 749: return R.drawable.avatar_clipboard_paper_blue;
			case 750: return R.drawable.avatar_smiley_grin_white;
			case 751: return R.drawable.avatar_email_minimal_yellow;
			case 752: return R.drawable.avatar_email_minimal_pink;
			case 753: return R.drawable.avatar_clothes_tie_blue;
			case 754: return R.drawable.avatar_food_green;
			case 755: return R.drawable.avatar_plant_pink;
			case 756: return R.drawable.avatar_book_hardcover_open_red;
			case 757: return R.drawable.avatar_lamp_yellow;
			case 758: return R.drawable.avatar_cupcake_blue;
			case 759: return R.drawable.avatar_snowflake_white;
			case 760: return R.drawable.avatar_icecream_bar_yellow;
			case 761: return R.drawable.avatar_laptop_pink;
			case 762: return R.drawable.avatar_scale_yellow;
			case 763: return R.drawable.avatar_palmtree_yellow;
			case 764: return R.drawable.avatar_food_apple_pink;
			case 765: return R.drawable.avatar_brick_blue;
			case 766: return R.drawable.avatar_smiley_angry_pink;
			case 767: return R.drawable.avatar_city_yellow;
			case 768: return R.drawable.avatar_delete_white;
			case 769: return R.drawable.avatar_check_green;
			case 770: return R.drawable.avatar_moon_blue;
			case 771: return R.drawable.avatar_train_track_pink;
			case 772: return R.drawable.avatar_store_pink;
			case 773: return R.drawable.avatar_video_pink;
			case 774: return R.drawable.avatar_tv_green;
			case 775: return R.drawable.avatar_book_red;
			case 776: return R.drawable.avatar_camera_flash_green;
			case 777: return R.drawable.avatar_sleep_red;
			case 778: return R.drawable.avatar_rocket_pink;
			case 779: return R.drawable.avatar_plant_blue;
			case 780: return R.drawable.avatar_thumbs_up_red;
			default: throw new RuntimeException("Undefined identicon ID: "+authorIndex);
		}
	}

}
